From 91d86d5e62cb16b3f8e6b387d6ce49e433bde643 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 5 Mar 2007 14:09:19 +0000 Subject: [PATCH] linux: Remove unnecessary locking from pcifront free_root_bus_devs(). Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/pcifront/pci_op.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/pcifront/pci_op.c b/linux-2.6-xen-sparse/drivers/xen/pcifront/pci_op.c index 47b4d1e372..608c277b2f 100644 --- a/linux-2.6-xen-sparse/drivers/xen/pcifront/pci_op.c +++ b/linux-2.6-xen-sparse/drivers/xen/pcifront/pci_op.c @@ -239,17 +239,12 @@ static void free_root_bus_devs(struct pci_bus *bus) { struct pci_dev *dev; - down_write(&pci_bus_sem); while (!list_empty(&bus->devices)) { - dev = container_of(bus->devices.next, struct pci_dev, bus_list); - up_write(&pci_bus_sem); - + dev = container_of(bus->devices.next, struct pci_dev, + bus_list); dev_dbg(&dev->dev, "removing device\n"); pci_remove_bus_device(dev); - - down_write(&pci_bus_sem); } - up_write(&pci_bus_sem); } void pcifront_free_roots(struct pcifront_device *pdev) -- 2.30.2